package org.example;

/**
 * @author: knowno
 * @create: 2025-09-09 15:19
 * @Version 1.0
 **/
public class TestSwitchCase {

    public static void main(String[] args) {
        //byte,short,int,char
        //1.5 enum
        //1.7 String
        String a = "1";
        switch (a){
            //规则 常量不重复
            case "1":
                System.out.println("1");
//                break; //break 非必需
            case "2":
                System.out.println("2");
                break;
            default:
                System.out.println("default");
        }
    }
}
